package com.result.demo.scheduled;


import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDateTime;

/**
 * @author chao.z
 */
@Configuration
//@EnableScheduling
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ScheduledProduct {





    @Scheduled(cron = "0/5 * * * * ?")
    private void configureTasks() {
        System.err.println("执行静态定时任务时间: " + LocalDateTime.now());
    }


    /**
     * 定时任务 同步商品
     */
    @Scheduled(cron = "0/5 * * * * ?")
    private void saveProductTask(){
    }

}
